Yacon.widget.TOutFrame = function(conText){
	
	Yacon.apply(this,conText);
	
	this.baseCreate();
	
};

Yacon.widget.TOutFrame.prototype = {
	
	baseCreate: function(){
		this.elementID = this.view.id;
		this.elementType = this.view.type;
		this.url = this.view.url;
	},

	getHtml: function(){
		
		var html = "<iframe ";
		
		html += " lily-id='"+this.elementID+"' lily-type='"+this.elementType+"' ";
		html += " bgcolor='#d4d0c8' id='frmContainer' src='' frameborder='0' ";
		html += " style='width:"+this.view.width+"; height:"+this.view.height+";' scrolling='auto' ";
		
		html += ">";
		
		html += "</iframe>";	
		
		return html;
	},
	
	show: function(){
	  
	   var adapterUrl = ""; 
	   if(this.view.isPortal){
		   adapterUrl = Yacon.getRootPath() + this.url;
	   }else{
		   adapterUrl = getAbsolutePath(this.url);
	   }
	   
	   if(adapterUrl.startsWith("/UI")){
		   adapterUrl = Yacon.getRootPath()+adapterUrl;
	   }
	   
	   adapterUrl = Yacon.addToken(adapterUrl);
		
	   $("iframe[lily-id='"+this.elementID+"']").attr("src",adapterUrl);	   
	},
	
	addEvents: function(){
		this.show();
	},
	
	layoutBefore: function(){
		
	}

};